#!/usr/bin/env python3
# -*- coding: utf-8 -*-

def find_smallest(arr):
    smallest = arr[0]
    smallest_index = 0
    for i in range(1, len(arr)):
        if arr[i] < smallest:
            smallest = arr[i]
            smallest_index = i
    return smallest_index

def selection_sort(arr):
    new_array = []
    for i in range(len(arr)):
        smallest = find_smallest(arr)
        new_array.append(arr.pop(smallest))
    return new_array

my_array = [1, 9, 45, 7, 15, -5, 2, 74, -27, 10]
print(selection_sort(my_array))